﻿
using System.IO;
namespace AzukiMap
{
    public static class AzukiMapSettings
    {
        public const string SERVER_BASE_URI = "http://localhost/AzukiMap/";
        public const string GET_POSTGISDATA = "/getGeomDataAttr.php";
        public const string DEFAULT_GETPOSTGISDATA_URI = SERVER_BASE_URI + GET_POSTGISDATA; 
        public const int DEFAULT_SRID = 4326;
        public const int DPI = 96;
        public const double DEFAULT_MAXSCALE = 999999999999999999;
        public const double DEFAULT_MINSCALE = 0;
        public const double DEFAULT_FILL_OPACITY = 0.5;
        public const int NO_IMAGE_TILE_WIDTH = 256;
        public const int NO_IMAGE_TILE_HEIGHT = 256;
        public const string NO_IMAGE_TILE = "http://farm.azukimap.jp/am/noImageTile.png";

        public const int SELECTED_FILL_COLOR_R = 255;
        public const int SELECTED_FILL_COLOR_G = 255;
        public const int SELECTED_FILL_COLOR_B = 0;
        public const int SELECTED_FILL_COLOR_A = 255;
        public const int SELECTED_STROKE_COLOR_R = 255;
        public const int SELECTED_STROKE_COLOR_G = 255;
        public const int SELECTED_STROKE_COLOR_B = 255;
        public const int SELECTED_STROKE_COLOR_A = 255;

        public const int HIGHLIGHTED_FILL_COLOR_R = 255;
        public const int HIGHLIGHTED_FILL_COLOR_G = 255;
        public const int HIGHLIGHTED_FILL_COLOR_B = 0;
        public const int HIGHLIGHTED_FILL_COLOR_A = 128;
        public const int HIGHLIGHTED_STROKE_COLOR_R = 255;
        public const int HIGHLIGHTED_STROKE_COLOR_G = 255;
        public const int HIGHLIGHTED_STROKE_COLOR_B = 0;
        public const int HIGHLIGHTED_STROKE_COLOR_A = 255;

        public const double INCHES_PER_METER = 39.3701;
        public const double INCHES_PER_DEGREES = 4374754;

        public const double INIT_DUMMY_SCREEN_SIZE = 0.1;

        public static double InchesPerUnit(CoordinationUnits unit)
        {
            double[] _inchesPerUnit = new double[]{1, 12, 63360.0, 39.3701, 39370.1, 4374754};
            return _inchesPerUnit[(int)unit];
        }
    }

    public enum CoordinationUnits
    {
        INCHES = 0,
        FEET, 
        MILES, 
        METERS, 
        KILOMETERS, 
        DEGREES, 
    }

}
